﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PersonalWebsite.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class init10 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_TgaGame",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(5281),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 736, DateTimeKind.Local).AddTicks(2275),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Show",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(3945),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 736, DateTimeKind.Local).AddTicks(1016),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_ProExperience",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 946, DateTimeKind.Local).AddTicks(1637),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 734, DateTimeKind.Local).AddTicks(9645),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_HotMovie",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(2609),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 735, DateTimeKind.Local).AddTicks(9723),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_GameVideo",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(1295),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 735, DateTimeKind.Local).AddTicks(8472),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Book",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 946, DateTimeKind.Local).AddTicks(9872),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 735, DateTimeKind.Local).AddTicks(7146),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Ability",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 945, DateTimeKind.Local).AddTicks(9681),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 734, DateTimeKind.Local).AddTicks(8360),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "Time",
                table: "WP_Post",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(7480),
                comment: "发布时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 736, DateTimeKind.Local).AddTicks(3087),
                oldComment: "发布时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WP_Post",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(8600),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 736, DateTimeKind.Local).AddTicks(4191),
                oldComment: "创建时间");

            migrationBuilder.CreateTable(
                name: "WS_Project",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false, comment: "主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "项目名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Desc = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "项目描述")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Category = table.Column<string>(type: "varchar(255)", nullable: false, comment: "类型")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Link = table.Column<string>(type: "varchar(1000)", unicode: false, maxLength: 1000, nullable: false, comment: "项目地址")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DeleteTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "删除时间"),
                    IsDeleted = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "删除标识"),
                    DeletorId = table.Column<int>(type: "int", nullable: true, comment: "删除人"),
                    CreatorId = table.Column<int>(type: "int", nullable: false, comment: "创建人"),
                    CreateTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, defaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(6583), comment: "创建时间"),
                    EditorId = table.Column<int>(type: "int", nullable: true, comment: "编辑人"),
                    EditorTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "编辑时间")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WS_Project", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateIndex(
                name: "IX_WS_Project_Category",
                table: "WS_Project",
                column: "Category");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "WS_Project");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_TgaGame",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 736, DateTimeKind.Local).AddTicks(2275),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(5281),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Show",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 736, DateTimeKind.Local).AddTicks(1016),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(3945),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_ProExperience",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 734, DateTimeKind.Local).AddTicks(9645),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 946, DateTimeKind.Local).AddTicks(1637),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_HotMovie",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 735, DateTimeKind.Local).AddTicks(9723),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(2609),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_GameVideo",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 735, DateTimeKind.Local).AddTicks(8472),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(1295),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Book",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 735, DateTimeKind.Local).AddTicks(7146),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 946, DateTimeKind.Local).AddTicks(9872),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Ability",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 734, DateTimeKind.Local).AddTicks(8360),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 945, DateTimeKind.Local).AddTicks(9681),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "Time",
                table: "WP_Post",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 736, DateTimeKind.Local).AddTicks(3087),
                comment: "发布时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(7480),
                oldComment: "发布时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WP_Post",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 13, 14, 36, 37, 736, DateTimeKind.Local).AddTicks(4191),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 4, 2, 10, 47, 6, 947, DateTimeKind.Local).AddTicks(8600),
                oldComment: "创建时间");
        }
    }
}
